package com.bite.rabbitmq.listener;

import com.bite.rabbitmq.constant.Constants;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class DirectListener {

    @RabbitListener(queues = Constants.DIRECT_QUEUE1)
    public void fanoutListener1(String msg) {
        System.out.println("directListener1 msg: " + msg);
    }

    @RabbitListener(queues = Constants.DIRECT_QUEUE2)
    public void fanoutListener2(String msg) {
        System.out.println("directListener2 msg: " + msg);
    }
}
